<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
   <%@ include file="/common/pre/header.jsp" %>
    <script src="${ctx}/statics/js/backend/backend.js"></script>
    	 
	 <script type="text/javascript" src="<%=basePath %>js/jquery-1.8.3.js"  charset="utf-8"></script>
	<script type="text/javascript" src="<%=basePath %>plugins/layui/layui.js"  charset="utf-8"></script>
	<link rel="stylesheet" href="<%=basePath %>plugins/layui/css/layui.css"/>
<script type="text/javascript">
	
	function del(thisId){
		
				if(confirm("确认删除吗")){
			   window.location.href = "/1and5Demo/repairList/delId?computerId="+${computerId}+"&computerroomId="+${computerroomId}+"&id="+thisId;
			  }
			  else{
			 
			   return;
			  }
			}
		
	
	

</script>
</head>
<body>

<c:if test="${user == null}">
		<c:redirect url="login.jsp"></c:redirect>
	</c:if>

<!--End Header End-->
<div>
	<c:if test="${mes != null}">
			<script>
				$(function(){
					
					alert("此设备其他班级已经提交，请勿重复提交")
					
				});
			</script>
		</c:if>
	<c:if test="${user == null}">
		<c:redirect url="login.jsp"></c:redirect>
	</c:if>
		
    <!--Begin 用户中心 Begin -->
        <div>

        <div class="m_right" id="content">
            <div class="mem_tit">报修列表</div>
            <p>
         
            	 
            	 <c:if test="${user.roName =='组长' }"> <a href="/1and5Demo/login.jsp" class="add_b">退出</a></c:if>
            	 
            	 	 <a onclick="window.history.back();" class="add_b">返回</a>
                <a href="/1and5Demo/repairList/findR2?computerId=${computerId}&computerroomId=${computerroomId}"  class="add_b">刷新</a>
                <a href="/1and5Demo/computerinfo/findAddList?computerId=${computerId}&computerroomId=${computerroomId}"  class="add_b">添加</a>
               
                <br>
            </p>
            <br>
            <table border="0" class="order_tab" style="width:750px; text-align:center; margin-bottom:30px;"
                   cellspacing="0" cellpadding="0">
                <tbody>
                
                <!-- .m_content -->
                <!-- mem_tit -->
                <tr>
                    <td width="5%">电脑ID</td>
                    <td width="5%">故障情况</td>
                    <td width="5%">损坏时间</td>
                    <td width="5%">机房</td>
                    <td width="5%">班级</td>
                    <td width="5%">教员</td>
                    <td width="5%">提交人</td>
                    
                    <td width="5%">审核状态</td>
                    <c:if test="${user.roName !='组长' }"> <td width="5%" colspan="2">操作</td> </c:if>
                </tr>
                <c:forEach items="${rlist}" var="temp">
                    <tr>
                        
                        <td>${temp.computerId}</td>
                         
                         
                          <td>${temp.faultName}</td>
                    
                    
                    
                     <!--
                     
                     <td>
                        	<c:if test="${temp.faultId == 1}">
	                        	 显示屏损坏
	                         </c:if> <c:if test="${temp.faultId == 2}">
	                        	 键盘损坏
	                         </c:if> <c:if test="${temp.faultId == 3}">
	                        	 鼠标损坏
	                         </c:if> <c:if test="${temp.faultId == 11}">
	                        	 手机袋损坏
	                       </c:if> <c:if test="${temp.faultId == 5}">
	                        	 桌子损坏
	                       </c:if> <c:if test="${temp.faultId == 6}">
	                        	椅子损坏
	                       </c:if> <c:if test="${temp.faultId == 7}">
	                        	空调损坏
	                       </c:if> <c:if test="${temp.faultId == 8}">
	                        	 	缺少键盘
	                   	 </c:if><c:if test="${temp.faultId == 9}">
	                        		缺少鼠标
	                       </c:if>
	                     </td>
                     
                     
                     
                      - -->   
	                     
	                     
                        <td>${temp.faultTime}</td>
                        <td>${temp.computerroomName}</td>
                        <td>${temp.className}</td>
                        <td>${temp.teacherName}</td>
                         <td>${temp.userName}</td>
                        
                         <td>
                         <c:if test="${temp.statusId == 1}">
	                        	已提交
	                       </c:if>
	                       
	                      <c:if test="${temp.statusId == 2}">
	                        	待审核
	                       </c:if>
	                       <c:if test="${temp.statusId == 3}">
	                        	审核通过
	                       </c:if>
	                       
	                     </td>
	                     
	                     
	                     
	                     
	                      <c:if test="${user.roName =='老师'||user.roName=='维修人员' }"> 
                        <td><a href="/1and5Demo/repairList/rId?id=${temp.id}&computerId=${computerId}&computerroomId=${computerroomId}">修改</a></td>
                     
                        </c:if>
                         <c:if test="${user.roName =='管理员' }"> 
                        <td><a href="/1and5Demo/repairList/rId?id=${temp.id}&computerId=${computerId}&computerroomId=${computerroomId}">修改</a></td>
                        <td><a onclick="del(${temp.id})">删除</a></td>
                        </c:if>
                                            </tr>
                </c:forEach>
              
                </tbody>       
            </table>
       <%@ include file="/pagerBar.jsp" %>
        </div>
    </div>

</div>
</body>

</html>


